package com.example.hello.jni;

import android.graphics.Bitmap;

import java.nio.ByteBuffer;

public class DataBus {
    public native String stringFromJNI();

    public native long getByteBufferPtr(ByteBuffer byteBuffer);

    public native long getBitmapPixelDataMemoryPtr(Bitmap bitmap);

    public native void callJavaMethod();

    public String helloToC(String str) {
        System.out.println("我来自C++:" + str);
        return "我是java返回的" + str;
    }

    //调用C++开启新线程，并在线程里面返回调用结果
    public native void threadMethod();

}
